import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL}/merchant/coupon/index`,
		name: "获取优惠券列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	add: {
		url: `${config.API_URL}/merchant/coupon/add`,
		name: "新增优惠券",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	couponGoods: {
		url: `${config.API_URL}/merchant/coupon/add`,
		name: "获取优惠券商品",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	close: {
		url: `${config.API_URL}/merchant/coupon/close`,
		name: "删除优惠券",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	log: {
		url: `${config.API_URL}/merchant/coupon/log`,
		name: "领取日志",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	receiveLog: {
		url: `${config.API_URL}/merchant/coupon/receiveLog`,
		name: "所有的领取记录",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	}
}
